package com.honey.compilation.sql.ddl;

import com.honey.compilation.sql.SqlKeyWord;
import com.honey.compilation.sql.SqlTable;
import com.honey.core.builder.CharacterBuilder;
import com.honey.core.builder.CharacterBuilderFactory;
import com.honey.core.compiler.CompilationException;


/**
 * 修改表命令: ALERT TABLE ADD
 * @author Administrator
 *
 */
abstract class AlterTableAdd extends AlterTable{
	
	/**
	 * 构造函数
	 * @param tableName 表的名称
	 */
	public AlterTableAdd(String tableName) {
		super(tableName);	
	}

	/**
	 * 构造函数
	 * @param table 数据库表对象
	 */
	public AlterTableAdd(SqlTable table){
		super(table);
	}
	
	
	/**
	 * 构造函数
	 * @param schema 数据库的schema
	 * @param tableName 表的名称
	 */
	public AlterTableAdd(String schema,String tableName) {
		super(schema,tableName);	
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.honey.core.dom.sql.ddl.AlterTable#compiledContent(int)
	 */
	@Override
	public CharacterBuilder compiledContent(int indentLevel ) throws CompilationException{
		CharacterBuilder answer = CharacterBuilderFactory.createC16StringBuilder() 
		.append( super.compiledContent(indentLevel) )
		.append( SqlKeyWord.ADD );
		return answer;
	}
}
